import { postLogin } from './utils/requestPackage/postLogin'
import QQMapWX from './utils/qqmap-wx-jssdk.js'

App({
    onLaunch: function () {
        console.log('App onLaunch, App:');
        console.log(this);
        this.globalData.loginPromise = new Promise(resolve => {
            wx.login({
                success: res => {
                    postLogin(res.code, this.globalData, resolve);
                }
            });
        });
    },

    //这个东西貌似可以写个全局的异常上报
    onError: function (e) {
        console.log(e)
    },

    globalData: {
        userInfo: null,
    },
    QQMapWX: new QQMapWX({ key: 'G5VBZ-OB2W4-RCIUH-XA7EF-WSUK5-BNFAB' })
});